home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / BIRTHSRC.ZIP / RANDOM.INC < prev    next >
Text File  |  1993-11-23  |  2KB  |  55 lines

  1. ;╔════════════════════════════════════════════════╗
  2. ;║  Name:Random_Number_Generator_________  V01.00 ║
  3. ;║                                                ║
  4. ;║  Modified:29-Oct-93                   FB ║
  5. ;╚════════════════════════════════════════════════╝
  6. ;
  7.  
  8. ;**************************************************
  9.  
  10. random64  dd    423497850,293874509,872340985,720349875,029834709
  11.       dd    389735263,249879782,435345234,852938745,982697526
  12.       dd    924387349,824624386,423645625,602586386,478557463
  13.       dd    101398630,987197471,051798980,798517092,309717542
  14.       dd    523778179,801324079,705476523,976215378,913405967
  15.       dd    078231980,357243764,320743262,306743789,420970738
  16.       dd    437809432,784284784,789017893,478248247,437624367
  17.       dd    436984342,362436234,122433436,266802430,984360250
  18.       dd    346230523,487023872,436876234,987625978,632874675
  19.       dd    432689432,872398243,698259634,062398734,652986324
  20.       dd    439084327,623462397,823486567,243729784,376576237
  21.       dd    439082364,624397825,398749234,862354987,525268234
  22.       dd    342098742,397843269,234983498,986538974
  23.  
  24. seed1      db    29
  25. seed2      db    63
  26.  
  27.  
  28. ;--------------------------------------------------
  29. ; Random - Random Number Generator
  30. ;    IN     : -
  31. ;   OUT     : - eax
  32. ;  Modified : eax,ebx
  33. ;  Vars Used: random64,seed1,seed2 (local cs)
  34.  
  35. Random        PROC
  36.  
  37.     xor    ebx,ebx
  38.     mov    bl,cs:seed1
  39.     mov    eax,cs:random64[4*ebx]
  40.  
  41.     mov    bl,cs:seed2
  42.     add    eax,cs:random64[4*ebx]
  43.  
  44.     mov    cs:random64[4*ebx],eax
  45.     inc    cs:seed1
  46.     and    cs:seed1,63
  47.     inc    cs:seed2
  48.     and    cs:seed2,63
  49.  
  50.     ret
  51.  
  52. Random          ENDP
  53. ;--------------------------------------------------
  54. ;**************************************************
  55.